﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Yule8xCommon.Applib;
using Yule8xCommon.Typelib;
using Yule8xModel;

namespace Yule8xWechat.XAgent
{
    public partial class Dailishouquanshu : System.Web.UI.Page
    {
        protected WxUserInfoResult wxUser;
        protected int user_id;
        protected string agent_sn;
        protected void Page_Load(object sender, EventArgs e)
        {
            user_id = RequestUtil.GetInteger("user_id");
            if (user_id < 1)
            {
                Response.Write("user_id无效!");
                Response.End();
            }
            wxUser = UserModels.GetWxUserInfo(user_id);
            if (null == wxUser)
            {
                Response.Write("用户不存在!");
                Response.End();
            }
            //  编号的构成是2017+月+日+上级代理ID+自己的ID月或日小于10的 不显示0
            agent_sn = string.Format("{0}{1}{2}",DateTime.Today.ToString("yyyyMd"),wxUser.parent1_uid,wxUser.user_id);

        }
    }
}